package com.sdry.service.approval;

import java.util.List;

import com.sdry.entity.ApprovalCustomEntity;
import com.sdry.entity.ApprovalEntity;
import com.sdry.entity.PageEntity;
import com.sdry.entity.agreement.Agreement;
import com.sdry.entity.approval.Approval;
import com.sdry.entity.approval.ApprovalExample;
import com.sdry.entity.approvalManagement.ApprovalDetail;
import com.sdry.entity.base.Department;
import com.sdry.entity.base.Staff;
/**
 * 
 * @ClassName ApprovalService
 * @Description 审批Service层
 * @Author lz
 * @Date 2018年9月3日 13:51:41
 * @Version 1.0
 */
public interface ApprovalService {

	/**
	 * 分页查询所有待审批
	 * @param pageEntity
	 * @return
	 */
	List<ApprovalCustomEntity> queryAllApproval(PageEntity pageEntity);

	/**
	 * 分页查询所有待审批条数
	 * @param pageEntity
	 * @return
	 */
	Long queryAllApprovalCount(PageEntity pageEntity);

	/**
	 * 插入提交审批信息
	 * @param approval
	 * @return
	 */
	Integer insertDept(ApprovalEntity approval);

	/**
	 * 查询所有部门：下拉框显示
	 * @return
	 */
	List<Department> queryAllDept();
	
	/**
	 * 带条件的分页查询
	 * @param example
	 * @return
	 */
	List<Approval> selectByExample(ApprovalExample example);
	
	ApprovalEntity findApprovalEntityByID(long approvalId);
	
	Integer setStatus(ApprovalEntity approvalEntity);

	List<Agreement> queryHTMLByAppId(String approvalId);
	
	/**
	 * 打印表单
	 * @param approvalId
	 * @return
	 */
	ApprovalDetail selectForm(String approvalId);

	ApprovalEntity findById(Long approvalId);

	void deleteByid(Long approvalId);

	String queryFieldTypeByFieldNameArr(String fieldNameArr);

	List<Staff> queryPeopleByDept(Long did);

	List<Agreement> selectAgreementByApprovalId(String aremark);

	List<Agreement> selectAgreementByAremark2(String aremark);
}
